home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1991 April / 1991-04.d64 / chaos 64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  818b  |  31 lines

  1. 0 rem copyright 1991 compute publications intl ltd - all rights reserved
  2. 100 poke 53280,0:poke 53281,0
  3. 110 print"[147][155]":a$="clearing the bitmap...":a=len(a$)
  4. 120 for x=1 to 20-a/2:print" ";:next:printa$
  5. 130 for x=8192 to 16192:poke x,0:next
  6. 140 ax=1:ay=1:bx=319:by=1:cx=160:cy=199
  7. 150 poke 53265,(peek(53265) or 32)
  8. 160 poke 53270,((peek(53270) and 223) or 16)
  9. 170 poke 53272,((peek(53272) and 240) or 8)
  10. 180 print"[147]":for x=1024 to 2024:poke x,255:next
  11. 190 x=int((rnd(ti)*319)+1)
  12. 200 y=int((rnd(ti)*199)+1)
  13. 210 fori=1to10000
  14. 220 p1=ax:p2=ay:gosub360:p1=bx:p2=by:gosub360
  15. 230 p1=cx:p2=cy:gosub360
  16. 240 ifi>1thenx=kx
  17. 250 ifi>1theny=ky
  18. 260 p=int((rnd(ti)*6)+1)
  19. 270 if p=1thendx=ax:dy=ay
  20. 280 if p=2thendx=ax:dy=ay
  21. 290 if p=3thendx=bx:dy=by
  22. 300 if p=4thendx=bx:dy=by
  23. 310 if p=6thendx=cx:dy=cy
  24. 320 kx=(dx+x)/2:ky=(dy+y)/2
  25. 330 p1=kx:p2=ky:gosub360
  26. 340 if i=10000thenend
  27. 350 next i
  28. 360 bt=8192+int(p2/8)*320+int(p1/8)*8+(p2 and 7)
  29. 370 poke bt,peek(bt) or 2^(7-(p1 and 7))
  30. 380 return
  31.